#include "PathPoint.h"
#include <stdio.h>

PathPoint::PathPoint() {
	x = 0;
	y = 0;
	angle = 0;
	fScore = -1;
	cameFrom = NULL;
}

PathPoint::PathPoint(int x_, int y_, int angle_)
{
	x = x_;
	y = y_;
	angle = angle_;
	fScore = -1;
	cameFrom = NULL;
}

PathPoint::PathPoint(int x_, int y_, int angle_, long fScore_, PathPoint *cameFrom_)
{
	x = x_;
	y = y_;
	angle = angle_;
	fScore = fScore_;
	cameFrom = cameFrom_;
}

void PathPoint::setPathPoint(int x_, int y_, int angle_)
{
	x = x_;
	y = y_;
	angle = angle_;
	fScore = -1;
	cameFrom = NULL;

}

int PathPoint::getX()
{
	return x;
}
int PathPoint::getY()
{
	return y;
}
int PathPoint::getAngle()
{
	return angle;
}

PathPoint* PathPoint::getCameFrom()
{
	return cameFrom;
}

long PathPoint::getFScore()
{
	return fScore;
}

void PathPoint::reset(int x_, int y_, int angle_, long val, PathPoint* pos)
{
	x = x_;
	y = y_;
	angle = angle_;
	fScore = val;
	cameFrom = pos;
}

void PathPoint::setCameFrom(PathPoint* pos)
{
	cameFrom = pos;
}

void PathPoint::setFScore(long val)
{
	fScore = val;
}

void PathPoint::reset(int x_, int y_, int angle_)
{
	x = x_;
	y = y_;
	angle = angle_;
	cameFrom = NULL;
}

bool operator== (PathPoint &cP1, PathPoint &cP2)
{
	return ( (cP1.getX() == cP2.getX()) && (cP1.getY() == cP2.getY()) && (cP1.getAngle() == cP2.getAngle()) );
}

PathPoint::~PathPoint(void)
{
}
